package org.apm.data.pusher;

import org.apm.data.bean.Parameter;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

public class PushMain {
    public static final String Day_Pattern = "yyyy-MM-dd";
    public static final DateTimeFormatter TF_Day = DateTimeFormat.forPattern(Day_Pattern);
    public static final DateTimeFormatter TF_Standard = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");

    public static void main(String[] args) throws InterruptedException {
        if (args.length > 0 && args[0].startsWith("--help")) {
            System.out.println("\t -type, the type of elasticsearch. should be desigated. \n"
                    + "\t -i|-ip , masterIp, should be desigated. Defaulte \"115.238.29.251\"\n"
                    + "\t -f|-from , the from time , should be '" + Day_Pattern + "'\n"
                    + "\t -t|-to , the to time , should be '" + Day_Pattern + "'\n");
            System.exit(0);
        } else if (args.length > 0 && args[0].startsWith("--background")) {
            new DataPushTimer().process();
        } else {
        }
    }
}
